<?php
//Script pour convertir les tables de la v1b1 en v1b2
include("config.php");
dbconnect();
mysql_query("ALTER TABLE `".$prefix."url`  ADD `type` TEXT NOT NULL,  ADD `refreshtime` INT NULL");
echo(mysql_error());
$req = mysql_query("SELECT * FROM ".$prefix."url");
while($data = mysql_fetch_array($req)) {
if(empty($data['type'])) {
mysql_query("UPDATE `".$prefix."url` SET `type` = 'time' WHERE `id` =".$data['id']." LIMIT 1 ;");
}
}
?>